﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Controls.Primitives;
using System.Windows.Interop;

namespace GurLoader.GlobalHotkey
{
    public class DefaultHwndSourceWrapper : IHwndSource
    {
        private HwndSource Source { get; set; }

        public DefaultHwndSourceWrapper(HwndSource source)
        {
            if (source == null)
                throw new ArgumentNullException("source");

            Source = source;
        }

        public void AddHook(HwndSourceHook hook)
        {
            Source.AddHook(hook);
        }

        public void RemoveHook(HwndSourceHook hook)
        {
            Source.RemoveHook(hook);
        }

        public IntPtr Handle
        {
            get { return Source.Handle; }
        }
    }
}
